<!DOCTYPE html>
<html lang="ZH-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>定位</title>
    <style>
      /* 子绝 父相   z-index显示层级 */
      .father {
        width: 80vw;
        height: 50vw;
        border: 1px solid #000;
        position: relative;
        left: 10vw;
      }
      .ONE {
        background-color: pink;
        width: 20vw;
        height: 20vw;
        position: relative;
        left: 30vw;
        top: 20vw;
      }
      .TWO {
        background-color: green;
        width: 20vw;
        height: 20vw;
        position: relative;
        left: 30vw;
        top: 20vw;
      }
    </style>
  </head>
  <body class="father">
    <div class="ONE">标题1</div>
    <div class="TWO">标题2</div>
  </body>
</html>
